﻿namespace Framework.FSM
{
    /// <summary>
    /// 状态机状态接口
    /// </summary>
    public interface IFsmState
    {
        /// <summary>
        /// 状态初始化接口
        /// </summary>
        /// <param name="fsm">状态属于的状态机</param>
        void Init(IFSM fsm);
        /// <summary>
        /// 状态开始接口
        /// </summary>
        /// <param name="fsm">状态属于的状态机</param>
        /// <param name="data">状态数据</param>
        void Enter(IFSM fsm, FsmStateDataBase data);
        /// <summary>
        /// 状态暂停接口
        /// </summary>
        /// <param name="fsm">状态属于的状态机</param>
        void Pause(IFSM fsm);
        /// <summary>
        /// 状态恢复接口
        /// </summary>
        /// <param name="fsm">状态属于的状态机</param>
        void Resume(IFSM fsm);
        /// <summary>
        /// 状态重置接口
        /// </summary>
        /// <param name="fsm">状态属于的状态机</param>
        void Reset(IFSM fsm);
        /// <summary>
        /// 状态离开接口
        /// </summary>
        /// <param name="fsm">状态属于的状态机</param>
        void Exit(IFSM fsm);
        /// <summary>
        /// 状态销毁接口
        /// </summary>
        /// <param name="fsm">状态属于的状态机</param>
        void Destroy(IFSM fsm);
        /// <summary>
        /// 状态更新函数
        /// </summary>
        /// <param name="frameTime">逻辑一帧时间</param>
        /// <param name="realTime">实际一帧时间</param>
        void Update(float frameTime, float realTime);
    }
}
